import { axios } from '@/utils/request'
import $notification from 'ant-design-vue/es/notification'
const api = {
  // 新增计划
  insertPlan: '/par/examPlan/insertPlan',
  insertPlanPersonnel: '/par/examPlan/insertPlanPersonnel',
  updatePlan: '/par/examPlan/updatePlan',
  deletePlan: '/par/examPlan/deletePlan',
  queryPlan: '/par/examPlan/queryPlan',
  queryPlanPersonnel: '/par/examPlan/queryPlanPersonnel',
  baseUrl: '/par/examPlan',
  queryOrg: '/par/examPlan/queryOrg',
  queryCate: '/par/examPlan/queryCate',
  queryItem: '/par/examPlan/queryCateItem',
  queryItemPersonnel: '/par/examPlan/queryCateItemPersonnel',
  insertItem: '/par/examPlan/insertItem',
  queryPeriod: '/par/examPlan/queryPeriod'
}
/**
 * 新增计划
 */
export function insertPlan (parameter) {
  return axios({
    url: api.insertPlan,
    method: 'post',
    data: parameter
  })
}
export function insertPlanPersonnel (parameter) {
  return axios({
    url: api.insertPlanPersonnel,
    method: 'post',
    data: parameter
  })
}
export function updatePlan (parameter) {
  return axios({
    url: api.baseUrl,
    method: 'put',
    data: parameter
  })
}
export function deletePlan (parameter) {
  return axios({
    url: api.baseUrl,
    method: 'delete',
    params: parameter
  })
}
export function queryPlan (parameter) {
  return axios({
    url: api.queryPlan,
    method: 'get',
    params: parameter
  })
}
export function queryPlanPersonnel (parameter) {
  return axios({
    url: api.queryPlanPersonnel,
    method: 'get',
    params: parameter
  })
}
export function queryOrg (parameter) {
  return axios({
    url: api.queryOrg,
    method: 'get',
    params: parameter
  })
}
export function queryCate (parameter) {
  return axios({
    url: api.queryCate,
    method: 'get',
    params: parameter
  })
}
export function queryItem (parameter) {
  return axios({
    url: api.queryItem,
    method: 'get',
    params: parameter
  })
}
export function queryItemPersonnel (parameter) {
  return axios({
    url: api.queryItemPersonnel,
    method: 'get',
    params: parameter
  })
}
export function insertItem (parameter) {
  return axios({
    url: api.insertItem,
    method: 'post',
    data: parameter
  })
}
export function queryPeriod (parameter) {
  return axios({
    url: api.queryPeriod,
    method: 'get',
    params: parameter
  })
}
